package HOANGTHANHCONG_SWING_BAI2;

public class controlle {
	public int cong(int a, int b){
		return a+b;
	}
	public int tru(int a, int b){
		return a-b;
	}
	public int nhan(int a, int b){
		return a*b;
	}
	public String chia(int a, int b){
		if(b==0){return ( "Cannot divide by zero");}
		else if(a==0&&b==0){return ("Result of function is underfined");}
		else {float k;
		k = (float)a/ (float)b;
		return (""+k);}
	}
}
